home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfstructcreate.z / pxfstructcreate
Encoding:
Text File  |  1998-10-30  |  5.0 KB  |  101 lines

  1. PXFSTRUCTCREATE(3F)                                    Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFSSTTRRUUCCTTCCRREEAATTEE - Creates an instance of the desired structure and
  6.      returns a nonzero handle in the argument _j_h_a_n_d_l_e
  7.  
  8. SSYYNNOOPPSSIISS
  9.      IINNTTEEGGEERR _j_h_a_n_d_l_e,, _i_e_r_r_o_r
  10.      CCHHAARRAACCTTEERR**_n _s_t_r_u_c_t_n_a_m_e
  11.      CCAALLLL PPXXFFSSTTRRUUCCTTCCRREEAATTEE ((_s_t_r_u_c_t_n_a_m_e,, _j_h_a_n_d_l_e,, _i_e_r_r_o_r))
  12.  
  13. IIMMPPLLEEMMEENNTTAATTIIOONN
  14.      UNICOS, UNICOS/mk, and IRIX systems
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  18.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  19.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  20.      7.2 F77 compiler.
  21.  
  22.      The PPXXFFSSTTRRUUCCTTCCRREEAATTEE() routine creates an instance of the desired
  23.      structure and returns a nonzero handle in the argument _j_h_a_n_d_l_e.  All
  24.      further references to this instance of the structure are through this
  25.      handle.  The initial values of components within the new instance of
  26.      the structure are undefined.
  27.  
  28.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  29.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  30.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  31.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  32.      IRIX, the default kind is KKIINNDD==44.
  33.  
  34.      The following are arguments for PPXXFFSSTTRRUUCCTTCCRREEAATTEE:
  35.  
  36.      _s_t_r_u_c_t_n_a_m_e
  37.                An input character variable.  _s_t_r_u_c_t_n_a_m_e specifies which
  38.                type of structure should be created.  Values for _s_t_r_u_c_t_n_a_m_e
  39.                that are currently recognized are shown in the following
  40.                table.  _s_t_r_u_c_t_n_a_m_e must be in lowercase letters; trailing
  41.                blanks are ignored.
  42.  
  43.                Values for _s_t_r_u_c_t_n_a_m_e:
  44.  
  45.                ---------------------------------------------------
  46.                              Structure     Header file containing
  47.                _s_t_r_u_c_t_n_a_m_e    name          definition
  48.                ---------------------------------------------------
  49.                FFLLOOCCKK         _f_l_o_c_k        <<ffccnnttll..hh>>
  50.                UUTTIIMMBBUUFF       _u_t_i_m_b_u_f      <<uuttiimmee..hh>>
  51.                UUTTSSNNAAMMEE       _u_t_s_n_a_m_e      <<ssyyss//uuttssnnaammee..hh>>
  52.                SSTTAATT          _s_t_a_t         <<ssttaatt..hh>>
  53.                TTMMSS           _t_m_s          <<ssyyss//ttiimmeess..hh>>
  54.                GGRROOUUPP         _g_r_o_u_p        <<ggrrpp..hh>>
  55.                PPAASSSSWWDD        _p_a_s_s_w_d       <<ppwwdd..hh>>
  56.                ---------------------------------------------------
  57.  
  58.      _j_h_a_n_d_l_e   An output integer variable.  The structure handle is
  59.                returned in _j_h_a_n_d_l_e.
  60.  
  61.      _i_e_r_r_o_r    An output integer variable.
  62.  
  63. EEXXIITT SSTTAATTUUSS
  64.      Upon successful completion of PPXXFFSSTTRRUUCCTTCCRREEAATTEE, the argument _i_e_r_r_o_r is
  65.      set to 0.  If any of the following conditions occur, PPXXFFSSTTRRUUCCTTCCRREEAATTEE
  66.      sets the argument to the corresponding value:
  67.  
  68.      EENNOONNAAMMEE        Component name is not defined for this structure
  69.  
  70.      EENNOOHHAANNDDLLEE      Instance of the structure could not be created
  71.  
  72. EEXXAAMMPPLLEESS
  73.                 program test
  74.                 integer junam, ierr, ilen
  75.                 character*15 sname
  76.           *  Create STRUCTURE to be used by uname()
  77.                 call pxfstructcreate('utsname',junam,ierr)
  78.                 if (ierr.ne.0) then
  79.                    print *,'FAIL: error from pxfstructcreate = ',ierr
  80.                 endif
  81.           *  Fill STRUCTURE through uname()
  82.                 call pxfuname(junam,ierr)
  83.                 if (ierr.ne.0) then
  84.                    print *,'FAIL: error from pxfuname = ',ierr
  85.                 endif
  86.                 ilen = 0
  87.           *  Retrieve component sysname from STRUCTURE
  88.                 call pxfstrget(junam,'sysname',sname,ilen,ierr)
  89.                 print *, 'sysname=',sname
  90.           *  Free STRUCTURE
  91.                 call pxfstructfree(junam,ierr)
  92.                 if (ierr.ne.0) then
  93.                    print *,'FAIL: error from pxfstructfree = ',ierr
  94.                 endif
  95.                 end
  96.  
  97. SSEEEE AALLSSOO
  98.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  99.      2165, for the printed version of this man page.
  100.  
  101.